<?

	CO_authority( );

	$JO[ "guide"	] = JO( array( "EN" => "Guide",		"KO" => "안내",		"VI" => "Guide"		) );
	$JO[ "form"		] = JO( array( "EN" => "Form",		"KO" => "양식",		"VI" => "Form"		) );
	$JO[ "record"	] = JO( array( "EN" => "Record",	"KO" => "기록",		"VI" => "Record"	) );

	$JO[ "date"		] = JO( array( "EN" => "Date",		"KO" => "일자",		"VI" => "Date"		) );
	$JO[ "subject"	] = JO( array( "EN" => "Subject",	"KO" => "제목",		"VI" => "Subject"	) );
	$JO[ "period"	] = JO( array( "EN" => "Period",	"KO" => "기간",		"VI" => "Period"	) );
	$JO[ "version"	] = JO( array( "EN" => "Version",	"KO" => "버전",		"VI" => "Version"	) );

	$CO[ "contract"	] = JO( array( "EN" => "Content Distribution Agreement",					"KO" => "콘텐트 유통 계약서",			"VI" => "Content Distribution Agreement"					) );
	$CO[ "list"		] = JO( array( "EN" => "Content Distribution Appendix - Content List",	"KO" => "콘텐트 유통 부속서 - 콘텐트 목록",	"VI" => "Content Distribution Appendix - Content List"	) );

?>


<div class="JO_bar_720">

	<h1><?= $JO[ "contract" ] ?> <?= $JO[ "guide" ] ?></h1>

	<div>



		<? if(	$_SESSION[ "JO_account_language"	] == "EN"				||
				$_SESSION[ "JO_account_authority"	] == "administrator"	||
				$_SESSION[ "JO_account_authority"	] == "observer"			||
				$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

			

		<? } ?>

		<? if(	$_SESSION[ "JO_account_language"	] == "KO"				||
				$_SESSION[ "JO_account_authority"	] == "administrator"	||
				$_SESSION[ "JO_account_authority"	] == "observer"			||
				$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

			아래 <span class="JO_positive">필요 양식 출력</span> 후 <span class="JO_positive">귀사 해당 정보 기입</span>, <span class="JO_positive">대표 이사 서명</span>, <span class="JO_positive">법인 인감 날인</span> 등을 부탁 드립니다.<br />

			해당 서류 스캔 사본을  <span class="JO_positive">jay@neowiz.vn</span>으로 발송 부탁 드립니다.<br />

			해당 서류 원본을  <span class="JO_positive">36 Truong Quyen, District 3, HCMC, Vietnam</span>으로 발송 부탁 드립니다.<br />

			수신자 성명은 <span class="JO_positive">Mr. Jay Casee</span>이며 연락처는 <span class="JO_positive">84 9 44 08 00 77</span>입니다.<hr />

		<? } ?>

		<? if(	$_SESSION[ "JO_account_language"	] == "VI"				||
				$_SESSION[ "JO_account_authority"	] == "administrator"	||
				$_SESSION[ "JO_account_authority"	] == "observer"			||
				$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

			

		<? } ?>

	</div>

</div>



<div class="JO_bar_720">

	<h1><?= $JO[ "contract" ] ?> <?= $JO[ "form" ] ?></h1>

	<div>

		<table>

			<tr>
				<th style="width: 65px;"	><?= $JO[ "date"		] ?></th>
				<th							><?= $JO[ "subject"		] ?></th>
				<th style="width: 65px;"	><?= $JO[ "version"		] ?></th>
				<th style="width: 145px;"	><?= $JO[ "period"		] ?></th>
			</tr>



			<? if(	$_SESSION[ "JO_account_language"	] == "EN"				||
					$_SESSION[ "JO_account_authority"	] == "administrator"	||
					$_SESSION[ "JO_account_authority"	] == "observer"			||
					$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

				<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_general_contract_1.0.0.docx" target="_blank">General Content Distribution Contract</a></td>
					<td class="JO_right">1.0.0</td>
					<td><?= JO_date( "2011-01-01" ) ?> <span class="JO_gray_40">~</span> <?= JO_date( "2011-12-31" ) ?></td>
				</tr>

				<!--<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_general_list_1.0.0.pdf" target="_blank">General Content Distribution Appendix - Content List</a></td>
					<td></td>
					<td class="JO_right">1.0.0</td>-->
				</tr>

			<? } ?>

			<? if(	$_SESSION[ "JO_account_language"	] == "KO"				||
					$_SESSION[ "JO_account_authority"	] == "administrator"	||
					$_SESSION[ "JO_account_authority"	] == "observer"			||
					$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

				<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_general_contract_1.0.0.docx" target="_blank">General Content Distribution Contract</a></td>
					<td class="JO_right">1.0.0</td>
					<td><?= JO_date( "2011-01-01" ) ?> <span class="JO_gray_40">~</span> <?= JO_date( "2011-12-31" ) ?></td>
				</tr>

				<!--<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_KR_contract_1.0.0.pdf" target="_blank">한국 콘텐트 유통 계약서</a></td>
					<td><?= JO_date( "2011-01-01" ) ?> <span class="JO_gray_40">~</span> <?= JO_date( "2011-12-31" ) ?></td>
					<td class="JO_right">1.0.0</td>
				</tr>-->

				<!--<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_KR_list_1.0.0.pdf" target="_blank">한국 콘텐트 유통 부속서 - 콘텐트 목록</a></td>
					<td></td>
					<td class="JO_right">1.0.0</td>
				</tr>-->

			<? } ?>

			<? if(	$_SESSION[ "JO_account_language"	] == "VI"				||
					$_SESSION[ "JO_account_authority"	] == "administrator"	||
					$_SESSION[ "JO_account_authority"	] == "observer"			||
					$_SESSION[ "JO_account_authority"	] == "SO"				) { ?>

				<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_general_contract_1.0.0.docx" target="_blank">General Content Distribution Contract</a></td>
					<td class="JO_right">1.0.0</td>
					<td><?= JO_date( "2011-01-01" ) ?> <span class="JO_gray_40">~</span> <?= JO_date( "2011-12-31" ) ?></td>
				</tr>

				<!--<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_VN_contract_1.0.0.pdf" target="_blank">Vietnam Content Distribution Contract</a></td>
					<td><?= JO_date( "2011-01-01" ) ?> <span class="JO_gray_40">~</span> <?= JO_date( "2011-12-31" ) ?></td>
					<td class="JO_right">1.0.0</td>
				</tr>-->

				<!--<tr>
					<td><?= JO_date( "2011-01-01" ) ?></td>
					<td><a href="JO_72_CO/CO_81_file_contract/CO_VN_list_1.0.0.pdf" target="_blank">Vietnam Content Distribution Appendix - Content List</a></td>
					<td></td>
					<td class="JO_right">1.0.0</td>
				</tr>-->

			<? } ?>



		</table><hr />

	</div>

</div>



<div class="JO_bar_720">

	<h1><?= $JO[ "contract" ] ?> <?= $JO[ "record" ] ?></h1>

	<div>

		<table>

			<tr>
				<th style="width: 65px;"	><?= $JO[ "date"		] ?></th>
				<th							><?= $JO[ "subject"		] ?></th>
				<th style="width: 145px;"	><?= $JO[ "period"		] ?></th>
			</tr>

			<?

				$query = "

					SELECT	`type`,
							`file`,
							`subject`,
							`content`,
							`from`,
							`to`,
							`insert`
					FROM	`contract`
					WHERE	`delete` IS NULL
				";

				if(	$_SESSION[ "JO_account_authority" ] != "administrator"	&&
					$_SESSION[ "JO_account_authority" ] != "observer"		&&
					$_SESSION[ "JO_account_authority" ] != "SO"				) $query .= " 
						AND	`organization` = '" . $_SESSION[ "JO_account_organization" ] . "'
					";

					$recordSet = JO_query( $query );

					if( $recordSet -> num_rows ) while( $record = $recordSet -> fetch_array( ) ) {

			?>

				<tr>

					<td><?= JO_date( $record[ "insert" ] ) ?></td>

					<td <?= $record[ "content" ] ? "title='" . $record[ "content" ] . "'" : "" ?>>

						<a href="JO_72_CO/CO_81_file_contract/<?= $record[ "file" ] ?>" target="_blank"><?= $record[ "subject" ] ? $record[ "subject" ] : $CO[ $record[ "type" ] ] ?></a>

					</td>

					<? if( $record[ "from" ] ) { ?>

						<td><?= JO_date( $record[ "from" ] ) ?> <span class="JO_gray_40">~</span> <?= JO_date( $record[ "to" ] ) ?></td>

					<? } else { ?>

						<td></td>

					<? } ?>

				</tr>

			<? } else { ?>

				<tr>
					<td colspan="3" class="JO_center">...</td>
				</tr>

			<? } ?>

		</table>

	</div>

</div>
